<!-- search area   -->
<div class="row searchLineWrap">
	<form class="form-horizontal" method="post" action="${cxt!}/platform/role/list" id="searchForm">
		  <div class="row">
		    <div class="col-md-5">
		      <div class="form-group">
		         <label  class="col-md-4 control-label">${_res["systemManage.roleName"]}</label>
		         <div class="col-md-8">
		            <input type="text" class="form-control" name="role.l_name" placeholder="${_res['systemManage.roleName']}" value="${paramMap['role.l_name']}"/>
		         </div>
		       </div>
		    </div>
	    
			<div class="col-md-5">
		      <div class="form-group">
		         <label  class="col-md-4 control-label">${_res["systemManage.menuStatus"]}</label>
		         <div class="col-md-8">
		          	  <#dict type="select" name="role.f_status"  dictCode="COMMON_STATUS" value="${paramMap['role.f_status']}" />
		         </div>
		       </div>
		    </div>
		    
		    <div class="col-md-2">
		        <div class="form-group">
		          <button type="button" class="btn btn-primary pull-left" onclick="ajaxForm('content','searchForm')">
		          <i class="fa fa-search m-l-sm m-r-xs"></i>${_res["system.search"]}</button>
		        </div>
		    </div>
		  </div>
	</form>
</div>
<!-- search area end  -->

<div class="row searchLineWrap">
	<% if(hasPrivilegeUrl("roleAdd")){ %>
		<p><a href="javascript:void(0);" onClick="ajaxContent('/platform/role/add/a');" class="btn btn-primary pull-left">${_res["systemManage.addRole"]}</a><div class="clearfix"></div></p>
	<% } %>
	<table class="table table-bordered table-hover dataTables-example">
	    <thead>
	        <tr>
	            <th>${_res["systemManage.roleName"]}</th>
	            <th>${_res["systemManage.roleDesc"]}</th>
	            <th>${_res["systemManage.menuStatus"]}</th>
	            <th>${_res["system.createtime"]}</th>
	            <th>${_res["system.operator"]}</th>
	        </tr>
	    </thead>
	    <tbody>
		    <% for(role in splitPage.list!){ %>
		      <tr >
		            <td>${role.name!}</td>
		            <td>${role.description!}</td>
		            <td><#dict type="lable" value='${role.status!}' dictCode="COMMON_STATUS"/></td>
		            <td>${role.createtime!}</td>
		            <td>
		            	<% if(hasPrivilegeUrl("roleView")){ %>
		               		<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/platform/role/view/${role.id!}');">${_res["system.view"]}</button>
		               	<% } %>
		                <% if(hasPrivilegeUrl("roleEdit")){ %>
		               		<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/platform/role/update/e-${role.id!}')">${_res["system.edit"]}</button>
		               	<% } %>
		                <% if(hasPrivilegeUrl("roleDelete")){ %>
		               		<button type="button" class="btn btn-sm btn-link" onClick="ajaxDelete('/platform/role/delete/${role.id!}')">${_res["system.delete"]}</button>
		               	<% } %>
		                <% if(hasPrivilegeUrl("rolePermissionAssign")){ %>
		               		<button type="button" class="btn btn-sm btn-link" data-toggle="modal" data-target="#myModal" data-whatever="${role.id!}">${_res["systemManage.resignPrivilege"]}</button>
		            	<% } %>
		            </td>
		      </tr>
		     <% } %>
	    </tbody>
	</table>
	<div id="splitPageDiv">
		<#page formId="searchForm"  />
	</div>
	<#nav />
</div>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModaLabel">
	<%include("resignPrivilege.html"){}%>
</div>	

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModaLabel">
  	<form class="form-horizontal">
		  <div class="modal-dialog" role="document">
		    <div class="modal-content">
		     <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
		        	<span aria-hidden="true">&times;</span>
		        </button>
		        <h4 class="modal-title" id="myModaLabel">${_res["systemManage.resignPrivilege"]}</h4>
		      </div>
		      <input type="hidden"  id="role_id" name="roleOperator.roleid" >
		      <div class="modal-body">
					<div class="partentDivWrap">
					  <div class="htmleaf-content bgcolor-3">
								<div id="main-container">
							        <div id="tree-container"></div>
							    </div>
							</div>              
					</div>
		      </div>
		      <div class="modal-footer">
		        <button type="button" class="btn btn-warning" data-dismiss="modal">${_res["system.return"]}</button>
		        <button type="button" class="btn btn-primary" onClick="submitRoleOperator()">${_res["system.save"]}</button>
		      </div>
		    </div>
		  </div>
	 </form>
</div>
